/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package battleship_client.screens;

import battleship_client.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import javax.swing.*;

/**
 *
 * @author jalejandrovc
 */
public class ScoresScreen extends Screen {

    public ScoresScreen(Controller c) {
        controller = c;
        setLookAndFeel();
        initComponents();
    }

    public void initComponents() {
        setTitle("Scores");
        setLocationRelativeTo(null);
        setResizable(false);
        setSize(400, 250);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);


        contentPane = getContentPane();
        mainPanel = new JPanel();
        mainPanel.setLayout(null);
        lblScore = new JLabel("SCORE: 123");
        lblGamesLost = new JLabel("GAMES LOST: 456");
        lblGamesPlayed = new JLabel("GAMES PLAYED: 789");
        lblGamesWon = new JLabel("GAMES WON: 159");
        lblTitle = new JLabel("Your Score");
        btnOk = new JButton("Ok");

        lblTitle.setFont(new Font("Lucida Grande", 1, 22));

        lblTitle.setBounds(150, 20, 200, 22);
        lblGamesPlayed.setBounds(20, 60, 200, 20);
        lblGamesWon.setBounds(20, 90, 200, 20);
        lblGamesLost.setBounds(20, 120, 200, 20);
        lblScore.setBounds(20, 150, 200, 20);
        btnOk.setBounds(50, 180, 100, 20);
        btnOk.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                controller.cancel(false);
            }
        });

        mainPanel.add(lblTitle);
        mainPanel.add(btnOk);
        mainPanel.add(lblGamesLost);
        mainPanel.add(lblGamesPlayed);
        mainPanel.add(lblGamesWon);
        mainPanel.add(lblScore);
        contentPane.add(mainPanel);

    }
    private Container contentPane;
    private JPanel mainPanel;
    private Controller controller;
    private JLabel lblTitle, lblScore, lblGamesPlayed, lblGamesWon, lblGamesLost;
    private JButton btnOk;

    /**
     * @return the lblScore
     */
    public JLabel getLblScore() {
        return lblScore;
    }

    /**
     * @return the lblGamesPlayed
     */
    public JLabel getLblGamesPlayed() {
        return lblGamesPlayed;
    }

    /**
     * @return the lblGamesWon
     */
    public JLabel getLblGamesWon() {
        return lblGamesWon;
    }

    /**
     * @return the lblGamesLost
     */
    public JLabel getLblGamesLost() {
        return lblGamesLost;
    }
}
